/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tv.global.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author ctrosch
 */
@Embeddable
public class ItemBannerPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "USR_TVBNNR_TVCONF_ID", nullable = false)
    private short idConf;
    @Basic(optional = false)
    @Column(name = "USR_TVBNNR_NORDEN", nullable = false)
    private short orden;

    public ItemBannerPK() {
    }

    public ItemBannerPK(short idConf, short orden) {
        this.idConf = idConf;
        this.orden = orden;
    }

    public short getIdConf() {
        return idConf;
    }

    public void setIdConf(short idConf) {
        this.idConf = idConf;
    }

    public short getOrden() {
        return orden;
    }

    public void setOrden(short orden) {
        this.orden = orden;
    }
    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idConf;
        hash += (int) orden;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ItemBannerPK)) {
            return false;
        }
        ItemBannerPK other = (ItemBannerPK) object;
        if (this.idConf != other.idConf) {
            return false;
        }
        if (this.orden != other.orden) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "tv.global.modelo.ItemBannerPK[usrTvbnnrTvconfId=" + idConf + ", usrTvbnnrNorden=" + orden + "]";
    }

}
